﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CrystalDecisions.CrystalReports.Engine;
using System.IO;
using CrystalDecisions.Shared;
using ServiceLayer.Util;

namespace WebApp
{
    public partial class Report_Generate : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Report report = new Report();
            string filePath = report.generateReport(DateTime.Today, DateTime.Today);
            Session["filePath"] = filePath;
            string url = "<script language='javascript' type='text/javascript'>window.open('Display.aspx','','height=600,width=900,status=yes,left=125,top=20,toolbar=no,menubar=no,scrollbars=yes,location=center,resizable=yes');</script>";
            Response.Write(url);
        }
    }
}
